]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Treat 'gesture-cancel' the same as 'gesture-end'
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 20 Feb 2013 07:23:51 +0000 (08:23 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 20 Feb 2013 16:43:44 +0000 (17:43 +0100)
When a swipe scroll completes, we scroll the active workspace into
view. This works fine if the gesture is completed properly by
emitting 'gesture-end', but not when Clutter considers the gesture
cancelled - in that case, the view remains stuck in an intermediate
position. To fix, treat 'gesture-cancel' the same as 'gesture-end'.

https://bugzilla.gnome.org/show_bug.cgi?id=689394

js/ui/workspacesView.js

index 8bb589f42bb857757dd387339ff3be3ffad01bdd..605f8a17151e1a4063be741deb9652880dde9284 100644 (file)
@@ -442,6 +442,11 @@ const WorkspacesDisplay = new Lang.Class({
                 this._workspacesViews[i].startSwipeScroll();
             return true;
         }));
+        panAction.connect('gesture-cancel', Lang.bind(this, function() {
+            clickAction.release();
+            for (let i = 0; i < this._workspacesViews.length; i++)
+                this._workspacesViews[i].endSwipeScroll();
+        }));
         panAction.connect('gesture-end', Lang.bind(this, function() {
             clickAction.release();
             for (let i = 0; i < this._workspacesViews.length; i++)